#include"Delay.h"
#include"led.h"
#include "usart.h"
#include"tim5.h"
int main()
{
   tim5_init();
   tim5_start();
   uint8_t dir=0,duty=0;
   while(1)
   {
      if(dir==0)
      {
         if(duty<100)
         {
            duty++;
         }
         else
         {
            dir=1;
         }
      }
      if(dir)
      {
         if(duty>2)
         {
            duty--;
         }
         else
         {
            dir=0;
         }
      }
      tim5_duty(duty);
      Delay_ms(30);
   }
}
